//
//  Beverage.m
//  Charles
//
//  Created by Leo on 2017/6/13.
//  Copyright © 2017年 charles. All rights reserved.
//

#import "Beverage.h"

@implementation Espresso {
    NSString *_name;
}

- (void)dealloc
{
    NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}

- (instancetype)init {
    if (self = [super init]) {
        _name = @"Espresso";
    }
    return self;
}

- (NSString *)getName {
    return _name;
}

- (double)cost {
    return 1.20;
}

@end

@implementation Decaf {
    NSString *_name;
}

- (void)dealloc
{
    NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}

- (instancetype)init {
    if (self = [super init]) {
        _name = @"Decaf";
    }
    return self;
}

- (NSString *)getName {
    return _name;
}

- (double)cost {
    return .20;
}

@end

@implementation DarkRoast {
    NSString *_name;
}

- (void)dealloc
{
    NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}

- (instancetype)init {
    if (self = [super init]) {
        _name = @"DarkRoast";
    }
    return self;
}

- (NSString *)getName {
    return _name;
}

- (double)cost {
    return 1.30;
}

@end

@implementation HouseBlend {
    NSString *_name;
}

- (void)dealloc
{
    NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}

- (instancetype)init {
    if (self = [super init]) {
        _name = @"HouseBlend";
    }
    return self;
}

- (NSString *)getName {
    return _name;
}

- (double)cost {
    return 1.89;
}

@end
